home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / misc / LEDA_gene.lha / LEDA-3.1c-generic / man / graph_misc.tex < prev    next >
Encoding:
Text File  |  1994-08-05  |  1.8 KB  |  44 lines

  1. \bigskip
  2. \bigskip
  3. {\magonebf 5.13 Miscellaneous}
  4. \bigskip
  5. {\bf 5.13.1 Some useful functions}
  6. \bigskip
  7.  
  8. \cleartabs
  9. \+$void$ complete\_graph($graph\&\ G,\ int\ n$) &\cr
  10. \+                           &creates a complete graph $G$ with $n$ nodes.\cr
  11. \+\cr
  12. \+$void$ random\_graph($graph\&\ G,\ int\ n,\ int\ m$)\cr
  13. \+                           &creates a random graph $G$ with $n$ nodes\cr
  14. \+                           &and $m$ edges.\cr
  15. \+\cr
  16. \+$void$ test\_graph($graph\&\ G$)
  17.                              &creates interactively a user defined graph $G$.\cr
  18. \+\cr
  19. \+$void$ test\_bigraph($graph\&\ G,\ nodelist\&\ A,\ nodelist\&\ B$)\cr
  20. \+                           &creates interactively a user defined bipartite\cr
  21. \+                           &graph $G$ with sides $A$ and $B$. All edges are\cr
  22. \+                           &directed from $A$ to $B$.\cr
  23. \+\cr
  24. \+$bool$ compute\_correspondence($graph\&\ G,\ edge\_array(edge)\&\ reversal$)\cr
  25. \+                           &computes for every edge $e = (v,w)$ in $G$ its\cr
  26. \+                           &reversal $reversal[e] = (w,v)$ in $G$ ( nil if\cr
  27. \+                           ¬ present). Returns true if every edge has a\cr
  28. \+                           &reversal and false otherwise.\cr
  29. \+\cr
  30. \+$void$ eliminate\_parallel\_edges($graph\&\ G$)\cr
  31. \+                           &removes all parallel edges from $G$.\cr
  32. \+\cr
  33. \+$void$ cmdline\_graph($graph\&\ G$,\ int\ argc,\ char**\ argv)\cr
  34. \+              &builds graph $G$ as specified by the command line\cr
  35. \+              &arguments:\cr
  36. \+              &prog \hskip 2cm &$\longrightarrow$ test\_graph()\cr
  37. \+              &prog $n$        &$\longrightarrow$ complete\_graph($n$)\cr
  38. \+              &prog $n$ $m$    &$\longrightarrow$ test\_graph($n,m$)\cr
  39. \+              &prog $file$     &$\longrightarrow$ $G$.read\_graph($file$)\cr
  40.  
  41.    
  42. \vfill\eject
  43.  
  44.